package sh.wnxy.wn38.service.impl;

import org.springframework.beans.factory.annotation.Autowired;
import sh.wnxy.wn38.entity.Ticket;
import sh.wnxy.wn38.mapper.TicketMapper;
import sh.wnxy.wn38.service.ITicketService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

import java.time.LocalDate;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author wn38
 * @since 2021-07-14
 */
@Service
public class TicketServiceImpl extends ServiceImpl<TicketMapper, Ticket> implements ITicketService {
    @Autowired
    TicketMapper ticketMapper;
    @Override
    public Integer addnum(LocalDate date, Integer id, String spottype, Integer num) {
        return ticketMapper.addnum(date, id, spottype, num);
    }

    @Override
    public Integer subnum(LocalDate date, Integer id, String kind, Integer number) {
        return ticketMapper.subnum(date, id, kind, number);
    }

    @Override
    public Integer selectBydate(LocalDate date, Integer id, String spottype) {
        return ticketMapper.selectBydate(date, id, spottype);
    }
}
